<?php

class FileUploadView{

	const NO_MESSAGE = "";
	const NO_FILE_SELECTED = "Ingen fil har valts";
	const WRONG_TYPE = "Otillåten filtyp";
	const SUCCESS = "Filen laddades upp";

	public function Message($Message)
	{
		return "
			<div class='message'>$Message</div>
		";
	}

	public function CreateUploadForm()
	{
		return "
			<form method='post' enctype='multipart/form-data'>
				<input type='file' name='file' id='file' />

				</br>

				<input type='submit' name='submit' value='Ladda upp' />
			</form>
		";
	}
	// Kontrollerar om användaren vill ladda upp en fil
	public function TriedToUpload()
	{
		return isset($_POST['submit']);
	}

	public function GetFile()
	{
		var_dump($_FILES['file']);
		return $_FILES['file'];
	}
}